import { queryDept, add, edit, del } from '@/services/administrativeOfficesManagementApi';

export default {
    namespace: 'administrativeOfficesManagement',

    state: {
    },

    effects: {
        /**
        * 分页
         * */
        *queryDept({ payload }, { call, put }) {
            const response = yield call(queryDept, payload);
            return response;
        },

        /**
        * 添加
        * @param payload
        * @param call
        * @param put
        * @returns {Generator<*, *, *>}
        */
        *add({ payload }, { call, put }) {
            const response = yield call(add, payload);
            return response;
        },

        /* 编辑 */
        *edit({ payload }, { call, put }) {
            const response = yield call(edit, payload);
            return response;
        },
        /* 删除 */
        *del({ payload }, { call, put }) {
            const response = yield call(del, payload);
            return response;
        },






    },

    reducers: {


    },
};

